package com.ks.service;

import com.ks.base.BaseService;
import com.ks.dao.PaperStudentQuestionDao;
import com.ks.entity.PaperStudentQuestion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * 学生考试试卷表(TLxPaperStudentQuestion)表服务接口
 *
 * @author makejava
 * @since 2019-07-18 17:07:35
 */
@Service("paperStudentQuestionService")
public class PaperStudentQuestionService<T> extends BaseService<T> {

    @Autowired
    private PaperStudentQuestionDao<T> dao;

    public PaperStudentQuestionDao<T> getDao(){
        return dao;
    }
    public void updateAnswersByPaperIdAndQuestionId(Object o) {
        dao.updateAnswersByPaperIdAndQuestionId(o);

    }

    /**
     * 考生模拟练习答题情况,带答案
     * @param o
     * @return
     */
    public List<Map<String, Object>> queryQuestionDetailAnswers(Object o) {
        List<Map<String, Object>> list =dao.queryQuestionDetailAnswers(o);
        return  list;
    }

    /**
     * 答题面板
     * @param o
     * @return
     */
    public List<PaperStudentQuestion> queryPaperUserQuestions(Object o) {
        List<PaperStudentQuestion> list =dao.queryPaperUserQuestions(o);
        return  list;
    }
}